package tech.wenxu.eurekaprovider.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import tech.wenxu.eurekaprovider.config.Ipconfig;

/**
 * @author zhaowenxu
 * @date 2020/4/10 17:22
 */
@Slf4j
@RestController
public class HelloCotnroller {

    @Autowired
    private Ipconfig ipconfig;

    @GetMapping("/hello/{name}")
    public String hello(@PathVariable String name) {
        log.info("服务提供者执行{}" , ipconfig.getPort());
        return "springboot hello " + name;
    }
}
